package com.hyts.infodb.zuul.bean;

import com.hyts.infodb.bean.po.BasePO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Set;

/**
 * project-name:infodb
 * package-name:com.hyts.infodb.zuul.bean
 * author:Libo/Alex
 * create-date:2019-05-22 07:58
 * copyright:libo-hyts-github
 * email:libo2dev@aliyun.com
 * description:此类主要用于: zuul route 路由 数据对象
 */
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name="TBL_ZUUL")
@Data
@Accessors(chain=true)
public class ZuulRoutePO extends BasePO {

    /**
     * path 请求path pattern
     */
    @Column(name="PATH")
    private String path;

    /**
     * url dispatcher url website
     */
    @Column(name="URL")
    private String url;

    /**
     * support the cloud model server support
     */
    @Column(name="SERVICE_ID")
    private String serviceId;

    /**
     *  Flag to determine whether the prefix for this route (the path, minus pattern
     *  patcher) should be stripped before forwarding.
     */
    @Column(name="STRIP_PREFIX")
    private Boolean stripPrefix;

    /**
     * whether is or not retryable
     */
    @Column(name="RETRYABLE")
    private Boolean retryable;

    /**
     * is or not enable
     */
    @Column(name="ENABLED")
    private Boolean enabled;

    /**
     * senstive header头
     */
    //@Transient
    //private Set<String> sensitiveHeaders;

    /**
     * 是否定制化header头
     */
    //@Transient
    //private boolean customSensitiveHeaders;

}
